#include <iostream>
#include <iomanip>

using namespace std;

int main(int argc, char* argv[])
{
	int number;
	cin>>number;
	for (int i = 0; i < number; i++) {
		int p, q;
		cin>>p>>q;
		cout<<setiosflags(ios::fixed);
		cout<<setprecision(3);
		cout<<(q + p + 10.0) / 7.0<<endl;

	}
	return 0;
}